<template>
  <div class="home-container">
    <h3>Home 组件</h3>
    <button @click="toAbout">跳转到关于页面</button>
  </div>
</template>

<script>
export default {
  name: 'MyHome',
  methods: {
    toAbout () {
      // this.$router.push({
      //   path: '/about',
      //   query: {
      //     name: 'zs',
      //     age: 20
      //   }
      // })

      this.$router.push({
        name: 'about',
        params: {
          name: 'tt'
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.home-container {
  min-height: 200px;
  background-color: pink;
  padding: 15px;
}
</style>
